home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2008 April / PCgo 2008-04 (DVD).iso / interface / contents / demoversionen_3846 / 13664 / files / Data1.cab / sdkdemoctl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-16  |  2.8 KB  |  97 lines

  1. /******************************************************************/
  2. /*                                                                */
  3. /*                      TurboCAD for Windows                      */
  4. /*                   Copyright (c) 1993 - 2001                    */
  5. /*             International Microcomputer Software, Inc.         */
  6. /*                            (IMSI)                              */
  7. /*                      All rights reserved.                      */
  8. /*                                                                */
  9. /******************************************************************/
  10.  
  11. // SDKDemoCtl.h : Declaration of the CSDKDemoCtrl OLE control class.
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CSDKDemoCtrl : See SDKDemoCtl.cpp for implementation.
  15.  
  16. class CSDKDemoCtrl : public COleControl
  17. {
  18.     DECLARE_DYNCREATE(CSDKDemoCtrl)
  19.  
  20. // Constructor
  21. public:
  22.     CSDKDemoCtrl();
  23.  
  24. // Overrides
  25.     // ClassWizard generated virtual function overrides
  26.     //{{AFX_VIRTUAL(CSDKDemoCtrl)
  27.     public:
  28.     virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  29.     virtual void DoPropExchange(CPropExchange* pPX);
  30.     virtual void OnResetState();
  31.     protected:
  32.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  33.     //}}AFX_VIRTUAL
  34.  
  35. // Implementation
  36. protected:
  37.     CString m_strAllLayers;
  38.     BOOL m_bFirstDraw;
  39.     IApplication* m_pIApp;
  40.     IDrawing* m_pIDrawing;
  41.     View* m_pView;
  42.     CPoint m_ptMouseDown;
  43.     double m_dragX;
  44.     double m_dragY;
  45.     VARIANT m_dragOutline;
  46.     IGraphic* m_pDragGraphic;
  47.     BOOL m_bDragging;
  48.  
  49.     ~CSDKDemoCtrl();
  50.     BOOL OpenDrawing(const CString& strFileName);
  51.     void CloseDrawing();
  52.     BOOL BeginDrag(const CPoint& point);
  53.     void Drag(const CPoint& point);
  54.     void EndDrag(const CPoint& point);
  55.  
  56.     DECLARE_OLECREATE_EX(CSDKDemoCtrl)    // Class factory and guid
  57.     DECLARE_OLETYPELIB(CSDKDemoCtrl)      // GetTypeInfo
  58.     DECLARE_PROPPAGEIDS(CSDKDemoCtrl)     // Property page IDs
  59.     DECLARE_OLECTLTYPE(CSDKDemoCtrl)        // Type name and misc status
  60.  
  61. // Message maps
  62.     //{{AFX_MSG(CSDKDemoCtrl)
  63.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  64.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  65.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  66.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  67.     //}}AFX_MSG
  68.     DECLARE_MESSAGE_MAP()
  69.  
  70. // Dispatch maps
  71.     //{{AFX_DISPATCH(CSDKDemoCtrl)
  72.     CString m_strFileName;
  73.     afx_msg void OnFileNameChanged();
  74.     CString m_strHideLayers;
  75.     afx_msg void OnHideLayersChanged();
  76.     afx_msg BSTR GetAllLayers();
  77.     //}}AFX_DISPATCH
  78.     DECLARE_DISPATCH_MAP()
  79.  
  80.     afx_msg void AboutBox();
  81.  
  82. // Event maps
  83.     //{{AFX_EVENT(CSDKDemoCtrl)
  84.     //}}AFX_EVENT
  85.     DECLARE_EVENT_MAP()
  86.  
  87. // Dispatch and event IDs
  88. public:
  89.     enum {
  90.     //{{AFX_DISP_ID(CSDKDemoCtrl)
  91.     dispidFileName = 1L,
  92.     dispidHideLayers = 2L,
  93.     dispidAllLayers = 3L,
  94.     //}}AFX_DISP_ID
  95.     };
  96. };
  97.